<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ic="http://ivyteam.ch/jsf/component"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:pm="http://primefaces.org/mobile">
 
    <h:head>
       <title><ui:insert name="title" /></title>
       <style>
     		.ui-editor {
		        width: 100% !important;
		    }
		    
		    .ui-row-toggler {
		    	width: 0px;
		    	height: 0px;
		    }
       </style>
       <script type="text/javascript">
       		function askForDeleteConfirmation() {
       			var cfrm = confirm("Are You Sure To Delete This Email?");
       			if(!cfrm) {
       				return false;
       			} else {
       				return true;
       			}
       		}
       		
       		function rowToggler() {
       			$(".btn-view").on("click", function() {
       				var gridCell = $(this).parent();
       				gridCell.find(".ui-row-toggler").click();
       				
       				var wholeRow = gridCell.parent();
       				wholeRow.find("span").css("font-weight", "");
       			});
       		}
       		
       		function forwardEmailHandler(id) {
       			eval("forwardEmail_"+id+"()");
       			mainTabView.select(0);
       		}
       		
       		function resumeEditHandler(id) {
       			eval("resumeEdit_"+id+"()");
       			mainTabView.select(0);
       		}
       </script>
    </h:head>
    <h:body>
       <div id="wm_header">
       		<ui:insert name="heading">
       			<h:form>
			    	<h1>Welcome! <h:outputText value="#{ivy.session.getSessionUser().getFullName()}" /> - <h:commandLink value="Logout" actionListener="#{logic.logout}"></h:commandLink>   </h1>
			    </h:form>
       		</ui:insert>
       </div>	
       <div id="wm_content">
       		<ui:insert name="content" />
       </div>
    </h:body>
</html>